How to get INCOMING baselined links?

Hello,

I want to work with incoming baselined links, but get no link info :-(

I know:

- for incoming links you must load the source module

- for baselined links you must use 'all(obj <- linkMod)'

- for baselined links you must use 'load' instead of 'read'

but I get now infos for the links (only if I load the baselined source module via DOORS GUI).

/**
 * Created by: sturm
 * Creation date: 08.07.2014
*/
pragma encoding, "UTF-8"
 
Object obj
Link inLnk
string srcModName
ModName_ srcModRef
 
for obj in all current Module do {
print "object: " identifier obj "\n"
// 1:
for inLnk in all (obj <- "*") do {
print "# "
}
print "---\n"
// 2:
for srcModName in obj <- "*" do {
print "'" srcModName "'\n"
}
print "---\n"
// 3:
for srcModRef in obj <- "*" do {
print "'" name srcModRef "'\n"
}
print "---\n"
print "\n"
}

 

If I run it from the current module version, I get output for the source module name.

If I run it from a baseline version of the module, I get no output.

How can I load the baselined module version of the source module?


thsturm - Thu Jul 10 06:06:49 EDT 2014

Re: How to get INCOMING baselined links?
Mathias Mamsch - Thu Jul 10 07:55:52 EDT 2014

If you mean by "baselined links" non-echoed inlinks (those links with a hollow yellow triangle), then you need to use LinkRef instead of Link to iterate over the links. If you are in a module, where you do not have any of those non echoed links (they get deleted in the baseline in some ocasions, ouch, so you should not really rely on them), then you will need to know the modules from where the links were coming and look for the (non echoed) outlinks.

However in any case where you really want to evaluate baselined links you should think about

a) using the non echoed out links instead of the in links (not reliable)

b) use baseline sets to have proper links.

Maybe that helps, regards, Mathias

Re: How to get INCOMING baselined links?
thsturm - Thu Jul 10 08:50:16 EDT 2014

Thank you for the answer.

I nowhere had found the difference between 'Link' and 'LinkRef'. All I know was: use Link or LinkRef, but not when to use this or that :-(

I have a baselined module with incoming links from an also baselined module and I want to get the infos from the baselined source module.

Your hint with LinkRef gives me the right direction.